package com.kestrel.space.core.service;

import com.kestrel.space.common.model.User;
import com.kestrel.space.common.utils.LargePage;
import com.kestrel.space.core.dto.BlogDTO;
import com.kestrel.space.core.model.Blog;
import com.kestrel.space.core.query.BlogQuery;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author yebolin
 * @date 2024/8/23
 */
public interface BlogService {
    List<Blog> listContent(BlogQuery query, LargePage page);

    String saveOrUpdate(Blog blog);

    String batchSaveOrUpdate(List<Blog> blogList);

    String editBlogs(MultipartFile file, Long id);

    List<Blog> listPublicBlogs(BlogQuery query);

    List<Blog> listOrganizationBlogs(BlogQuery query);

    String allocate(Long pdfId, Long organizationId, boolean stage);

    List<Long> listMyBlogsInOrg(User user, Long organizationId);

    String downloadBlog(Long id, HttpServletRequest request, HttpServletResponse response);

    String deleteBlog(Long id);

    BlogDTO showBlogsDetail(Long id);
}
